package com.rc.saas.tenant.mapper.hlht;


import com.rc.saas.tenant.common.base.BaseMapper;
import com.rc.saas.tenant.model.elec.ElecStation;
import com.rc.saas.tenant.model.hlht.HlhtTenantOpen;
import com.rc.saas.tenant.model.hlht.HlhtTenantOpenStation;
import com.rc.saas.tenant.model.hlht.HlhtTenantOpenStationExample;
import com.rc.saas.tenant.model.operator.TenantOperatorStation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface HlhtTenantOpenStationMapper extends BaseMapper<Long, HlhtTenantOpenStation, HlhtTenantOpenStationExample> {
    void insertByBatch(@Param("elecStationList") List<ElecStation> elecStationList, @Param("hlhtTenantOpen") HlhtTenantOpen hlhtTenantOpen, @Param("hlhtOpenforType") String hlhtOpenforType, @Param("loginName") String loginName);

    void deleteByBatch(@Param("openStationIdList") List<Long> openStationIdList);

    void deleteByBatchHlhtTenantOpen(@Param("elecStationList") List<ElecStation> elecStationList, @Param("hlhtTenantOpen") HlhtTenantOpen hlhtTenantOpen, @Param("hlhtOpenforType") String hlhtOpenforType);

    void deleteByBatchHlhtOperateIds(@Param("openStationIdList") List<Long> openStationIdList, @Param("hlhtOperateId") String hlhtOperateId);

    void updateOperateStatusByBatch(@Param("openStationIdList") List<Long> openStationIdList, @Param("operateStatus") String operateStatus, @Param("loginName") String loginName);

    void updateTenantOperatorByStationId(@Param("tenantOperatorStationList") List<TenantOperatorStation> tenantOperatorStationList);

    List<HlhtTenantOpenStation> listStationByEnterprisePolicy(@Param("tenantCode") String tenantCode, @Param("hlhtOperatorId") String hlhtOperatorId, @Param("hlhtTenantCode") String hlhtTenantCode);

    List<Long> getElecStationIdByOpenStation(@Param("openStationIdList") List<Long> openStationIdList);

    void updateHlhtOpenforTypeBatchByOpenStationIdList(@Param("openStationIdList") List<Long> openStationIdList, @Param("hlhtOpenforType") String hlhtOpenforType);

    void updateOperateStatusByOpenStationId(@Param("openStationId") Long openStationId, @Param("operateStatus") String operateStatus);

    void updateOperateStatusByHlhtTenantOpen(@Param("hlhtTenantOpen") HlhtTenantOpen hlhtTenantOpen, @Param("operateStatus") String operateStatus);

    void updateHlhtOpenforTypeByElecStationListAndHlhtOperatorNotNull(@Param("hlhtTenantOpen") HlhtTenantOpen hlhtTenantOpen, @Param("elecStationIdList") List<Long> elecStationIdList, @Param("hlhtOpenforType") String hlhtOpenforType);

    void updateTenantOperatorCodeByStationId(@Param("stationIdList") List<Long> stationIdList, @Param("tenantOperatorCode") String tenantOperatorCode);

    List<Long> selectOpenStationIdByhlhtTenantOpen(@Param("stationIdList")List<Long> stationIdList, @Param("hlhtTenantOpen")HlhtTenantOpen hlhtTenantOpen);
}